<template>
	<div>
		<van-row style="height: 3vh;margin-top: 3vh;">
			<van-col style="margin-left: 0.625rem;line-height: 0.625rem;font-weight: 600;font-size: 15px;">
				新品上市
			</van-col>
		</van-row>
		<van-row style="margin-top: 1vh;overflow-x: scroll;" class="ccc">
			<van-col style="display: flex;flex-wrap: nowrap;" >
				<van-row style="width: 60vw;height: 39vh; margin-left: 10px;border-radius: 10px;box-shadow:3px 3px 3px #f3f3f3 inset;" v-for="(item,index) in list" :key="index">
					<van-col span="24">
						<van-row style="height: 23vh;">
							<van-image :src="url+item.original_img" :lazy-load="true" style="width: 70%;height: 99%;margin-top: 5px;"></van-image>
<!-- 							<img :src="url+item.original_img" v-lazy="url+item.original_img" style="width: 70%;height: 100%;"> -->
						</van-row>
						<van-row style="height: 5vh;line-height: 5vh; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-weight: 600;" @click="enterdetail(item.goods_id)">
							{{item.goods_name}}
						</van-row>
						<van-row style="height: 6vh;font-size: 14px;color: #ccc;display: -webkit-box;
　　-webkit-box-orient: vertical;
　　-webkit-line-clamp: 2;
　　overflow: hidden;
line-height: 3vh;">
							{{item.goods_name}}
						</van-row>
						<van-row class="bbb" style="height: 3vh;text-align: left;color: red;font-weight: 600;margin-bottom: 5px;">
							￥{{item.shop_price}}
						</van-row>
					</van-col>
				</van-row>
			</van-col>
		</van-row>
	</div>
</template>

<script>
	import { mapGetters } from 'vuex'
	export default {
	  data() {
	    return {
			url:'https://img.9lele.com',
	      list:[]
	    };
	  },
	  computed: {
	    ...mapGetters([
	      'swipers'
	    ])
	  },
	  created() {
	  	this.$store.dispatch("vuexNew","你好")
	  	.then(e=>{
	  	  console.log(e)
		  this.list = e.data.data
	  	})
	  },
	  methods:{
		  enterdetail(id){
			  this.$router.push({path:"/tests?id="+id})
		  }
	  }
	  }
</script>

<style>
	.ccc::-webkit-scrollbar{
		display: none;
	}
	.bbb:first-letter{
		font-size: 10px
	}
</style>
